import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/lanling";

// 查询列表
export function listOverConfig(query) {
  return request({
    url: '/system/app/over/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getOverConfig(id) {
  return request({
    url: '/system/app/over/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增
export function addOverConfig(data) {
  return request({
    url: '/system/app/over',
    method: 'post',
    data: data
  })
}

// 修改
export function updateOverConfig(data) {
  return request({
    url: '/system/app/over',
    method: 'put',
    data: data
  })
}

// 删除
export function delOverConfig(id) {
  return request({
    url: '/system/app/over/' + id,
    method: 'delete'
  })
}

export function getUserIds(id) {
  return request({
    url: '/system/app/over/getUserIds',
    method: 'get',
    params: id
  })
}

export function getOverWeightList(data) {
  return request({
    url: '/system/app/overWeight/list',
    method: 'get',
    params: data
  })
}

export function updateOverUserIds(data) {
  return request({
    url: '/system/app/over/updateOverUserIds',
    method: 'post',
    data: data
  })
}

export function saveOrUpdateOverWeight(data) {
  return request({
    url: '/system/app/overWeight/saveOrUpdateOverWeight',
    method: 'post',
    data: data
  })
}

export function listOver(data) {
  return request({
    url: '/system/app/over/userList',
    method: 'get',
    params: data
  })
}

export function getOverUserList(data) {
  return request({
    url: '/system/app/over/getOverUserList',
    method: 'get',
    params: data
  })
}


